#include <stdio.h>

int main(int argc, char const *argv[])
{
    int a;
    scanf("%d", &a);

    int t = a;
    int s = 0;

    while (t > 0)
    {
        s = 10 * s + t % 10;
        t /= 10;
    }

    printf("%d\n", s);
    
    return 0;
}